from flask import Flask, render_template
from static import settings
import pandas as pd

app = Flask(__name__)
app.config.from_object(settings)
f = pd.read_csv('recruit_data.csv')
data = f['post'].value_counts().to_dict()
valueData = []
xAxis = []
keys = list(data.keys())
for i in range(8):
    xAxis.append(keys[i])
    value = {'name': keys[i], 'value': data[keys[i]]}
    valueData.append(value)


@app.route("/")
def index():
    return render_template("ksh1.html", valueData=valueData,xAxis=xAxis)


if __name__ == '__main__':
    app.run()
